package com.wyz.note.project.nacos.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: wei yz
 * @Date: 2022/6/27 11:21
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    private static final Logger log = LoggerFactory.getLogger(DemoController.class);


    @Value("${wyz.username}")
    private String testName;

    @GetMapping("/name")
    public String demo() {
        log.info("测试：{}", testName);
        return "测试的名字： " + testName;
    }

}
